package org.openkanban.server.service.impl;

import org.openkanban.server.dao.HistoryDao;
import org.openkanban.server.domain.History;
import org.openkanban.server.service.HistoryService;
import org.openkanban.shared.util.HistoryAction;
import org.openkanban.shared.util.StatusCodes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * standard service implementation of {@code HistoryService}
 */
@Service
public class HistoryServiceDefaultImpl implements HistoryService {

    @Autowired
    HistoryDao historyDao;

    @Override
    public StatusCodes writeHistoryEntry(Long boardId, Long userId, Long activityId, HistoryAction historyAction, String text) {
	return historyDao.writeHistoryEntry(boardId, userId, activityId, historyAction, text);
    }

    @Override
    public History[] getFullBoardHistory(Long boardId) {
	return historyDao.getFullBoardHistory(boardId);
    }

    @Override
    public StatusCodes writeHistoryEntry(Long userId, Long parentActivityId, HistoryAction createKanban, String historyText) {
	return historyDao.writeHistoryEntry(userId, parentActivityId, createKanban, historyText);
    }

}
